package com.chenzhou.product_sys.service;

import com.chenzhou.product_sys.dao.impl.ProductDAOImpl;
import com.chenzhou.product_sys.entity.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductService {

    @Autowired
    private ProductDAOImpl dao;

    public Product queryProductById(Integer pid){
        return dao.queryProductById(pid);
    }

    public List<Product> queryAllProduct(){
        return dao.queryAll();
    }

    public int add_product(Product product){
        return dao.add_product(product);
    }

    public int modify_product(Product product){
        return dao.modify_product(product);
    }

    public int delete_product(Integer pid){
        return dao.delete_product(pid);
    }
}
